package com.sg.dto.integration.component;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * @desc TaskStatusDto
 * @使用场景
 */
@Data
public class TaskStatusDto extends BaseDto implements Serializable {

    /**
     * 进展状态标识
     */
    @ApiModelProperty("进展状态标识")
    private String taskStatusCode;

    /**
     * 进展状态名称
     */
    @ApiModelProperty("进展状态名称")
    private String taskStatusName;

    /**
     * 是否收起
     */
    @ApiModelProperty("是否收起")
    private String isRetract;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        TaskStatusDto that = (TaskStatusDto) o;
        return (
                taskStatusCode == that.taskStatusCode &&
                        taskStatusName == that.taskStatusName &&
                        isRetract == that.isRetract
        );
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                super.hashCode(),
                taskStatusCode,
                taskStatusName,
                isRetract
        );
    }

}
